﻿if(typeof em == "undefined") var em = new Object();
if (typeof em.session == "undefined") em.session = new Object();
em.session = function () {
};
em.session.prototype = {
    valid: function () {
        if (window.sessionStorage) return true;
        else return false;
    },
    set: function (k, v) {
        if (window.sessionStorage)
            window.sessionStorage.setItem(k, v);
    },
    get: function (k) {
        if (window.sessionStorage) return window.sessionStorage.getItem(k); else return null;
    },
    del: function (k) {
        if (window.sessionStorage) window.sessionStorage.removeItem(k);
    },
    clear: function () {
        if (window.sessionStorage) window.sessionStorage.clear();
    }
};
em.session.get = function (k) {
    if (window.sessionStorage) return window.sessionStorage.getItem(k); else return null;
}
em.session.set = function (k, v) {
    if (window.sessionStorage)
        window.sessionStorage.setItem(k, v);
}
em.session.del = function (k) {
    if (window.sessionStorage) 
        window.sessionStorage.removeItem(k);
}
em.session.clear = function (k) {
    if (window.sessionStorage) window.sessionStorage.clear();
}